package aps

import glory.xxd.Utils

/**
 *
 */
class MaterialInfoController {


    def commentService

    /**
     *  <USERNAME>张三</USERNAME>
     <EQPID>1FW0801</EQPID>
     <LotId>1231</LotId>
     * @return
     */
    def index() {
        def EQPID = params.EQPID ?: ""
        def USERNAME = params.USERNAME ?: ""
        def LotId = params.LotId ?: ""
        def body = MaterialIn.newInstance()
        body.setEQPID(EQPID)
        body.setUSERNAME(USERNAME)
        body.setLotId(LotId)
        String logUUID = Utils.getUUID();
        Header header = Header.newInstance()
        header.setMESSAGENAME("MaterialIn");
        header.setTRANSACTIONID(logUUID);
        def json = commentService.getJsonByObjectForTopic2Queue(logUUID, header, body)

        render json
    }
}